package org.jeecg.modules.business.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 协议单位-商品记录
 * @Author: jeecg-boot
 * @Date:   2023-05-25
 * @Version: V1.0
 */
@Data
@TableName("bus_commodity_record_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="bus_commodity_record_info对象", description="协议单位-商品记录")
public class BusCommodityRecord implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
	/**关联的协议账单id*/
	@Excel(name = "关联的协议账单id", width = 15)
    @ApiModelProperty(value = "关联的协议账单id")
    private String agreementOrderFeeId;
	/**类目*/
	@Excel(name = "类目", width = 15)
    @ApiModelProperty(value = "类目")
    @Dict(dictTable = "ces_stock_type", dicCode = "id", dicText = "name")
    private String categoryId;
	/**二级类目*/
	@Excel(name = "二级类目", width = 15)
    @ApiModelProperty(value = "二级类目")
    @Dict(dictTable = "ces_stock_type", dicCode = "id", dicText = "name")
    private String categoryTwoId;
	/**商品*/
	@Excel(name = "商品", width = 15)
    @Dict(dictTable = "ces_goods", dicCode = "id", dicText = "name")
    @ApiModelProperty(value = "商品")
    private String goodsId;
	/**单价*/
	@Excel(name = "单价", width = 15)
    @ApiModelProperty(value = "单价")
    private BigDecimal shopPrice;
	/**数量*/
	@Excel(name = "数量", width = 15)
    @ApiModelProperty(value = "数量")
    private BigDecimal buyNumber;
    /**退货数量*/
    @Excel(name = "退货数量", width = 15)
    @ApiModelProperty(value = "退货数量")
    private BigDecimal returnNumber;
	/**购买人*/
	@Excel(name = "购买人", width = 15)
    @ApiModelProperty(value = "购买人")
    private String purchaserName;
	/**购买总价格*/
	@Excel(name = "购买总价格", width = 15)
    @ApiModelProperty(value = "购买总价格")
    private BigDecimal amount;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remarks;
	/**状态(0-未退货；1-已退货)*/
	@Excel(name = "状态(0-未退货；1-已退货)", width = 15)
    @ApiModelProperty(value = "状态(0-未退货；1-已退货)")
    private Integer status;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    /**
     * 删除状态（0，正常，1已删除）
     */
    @Excel(name = "删除状态", width = 15,dicCode="del_flag")
    @TableLogic
    private Integer delFlag;

    private transient BigDecimal returnMaxNumber;
}
